﻿
using System.Configuration;

namespace Dexter.Search.Lucene.Configuration.OnPremise {
	public class LuceneConfigurationSection : ConfigurationSection {

		[ConfigurationProperty ( "titleBoost", IsRequired = false, DefaultValue = 2F )]
		public float TitleBoost {
			get { return ( float )this["titleBoost"]; }
			set { this["titleBoost"] = value; }
		}

		[ConfigurationProperty ( "tagsBoost", IsRequired = false, DefaultValue = 4F )]
		public float TagsBoost {
			get { return ( float )this["tagsBoost"]; }
			set { this["tagsBoost"] = value; }
		}

		[ConfigurationProperty ( "bodyBoost", IsRequired = false, DefaultValue = 1F )]
		public float BodyBoost {
			get { return ( float )this["bodyBoost"]; }
			set { this["bodyBoost"] = value; }
		}

		[ConfigurationProperty ( "minimumDocumentFrequency", IsRequired = false, DefaultValue = 5 )]
		public int MinimumDocumentFrequency {
			get { return ( int )this["minimumDocumentFrequency"]; }
			set { this["minimumDocumentFrequency"] = value; }
		}

		[ConfigurationProperty ( "minimumTermFrequency", IsRequired = false, DefaultValue = 2 )]
		public int MinimumTermFrequency {
			get { return ( int )this["minimumTermFrequency"]; }
			set { this["minimumTermFrequency"] = value; }
		}

		[ConfigurationProperty ( "minimumScore", IsRequired = false, DefaultValue = 0.1F )]
		public float MinimumScore {
			get { return ( float )this["minimumScore"]; }
			set { this["minimumScore"] = value; }
		}
	}
}
